#!/bin/sh
# PCP QA Test No. 1092
# Check pmGetVersion()
#
# Copyright (c) 2015 Ken McDonell.  All Rights Reserved.
#

seq=`basename $0`
echo "QA output created by $seq"

# get standard environment, filters and checks
. ./common.product
. ./common.filter
. ./common.check

status=1	# failure is the default!
trap "cd $here; rm -rf $tmp.*; exit \$status" 0 1 2 3 15

# don't trust the binary ... if we've upgraded packages this will
# be wrong
#
cd src
rm -f getversion getversion.o
if [ -f GNUmakefile.install ]
then
    echo "Using GNUmakefile.install ..." >>$seq_full
    $PCP_MAKE_PROG -f GNUmakefile.install getversion >>$seq_full 2>&1
else
    echo "Using GNUmakefile ..." >>$seq_full
    $PCP_MAKE_PROG getversion >>$seq_full 2>&1
fi
ls -l getversion >>$seq_full 2>&1
cd ..

# real QA test starts here
src/getversion

# success, all done
status=0

exit
